package com.cty.controller;

import org.apache.commons.io.FileUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.ServletContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.UUID;

/**
 * @Auther: cty
 * @Date: 2020/3/12 17:14
 * @Description:  控制器  下载
 * @version: 1.0
 */
@Controller
public class DemoController {
    @RequestMapping("demo")
    public ModelAndView Demo(){
        System.out.println("2-执行Demo控制器");
        ModelAndView mav = new ModelAndView("/demo.jsp");
        mav.addObject("model", "我爱我的祖国。");
        int a = 5/0;
        return mav;
    }
}
